<!DOCTYPE html>
<html>
<head>
    <title>消息详情</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    
    <link rel="stylesheet" href="${request.contextPath}/statics/bootstrap/css/bootstrap.css">
    
    <script src="${request.contextPath}/statics/plugins/jquery/jquery-3.3.1.min.js"></script>
    <script src="${request.contextPath}/statics/bootstrap/js/bootstrap.js"></script>
    <script src="${request.contextPath}/statics/plugins/vue/vue.js"></script>
    <script src="${request.contextPath}/statics/js/util.js"></script>
    
    <style type="text/css">
        .center, th {
            text-align: center;
        }
        .deal-status-click:hover, .msg-log-dtl:hover {
            text-decoration: underline;
            font-weight: bolder;
            color: blue;
            cursor: pointer;
        }
        .msg-deal-success {
            color: green;
            font-weight: bolder;
        }
        .msg-deal-fail {
            color: red;
            font-weight: bolder;
        }
    </style>
</head>
<body>
<div id="slothMain" v-cloak style="margin: 30px 50px 30px 50px;">
    <div class="row" style="margin-bottom: 20px;">
        <form class="form-horizontal" style="width: auto;">
            <div class="form-group col-md-12">
                <label class="control-label">消息详情</label>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">ID：</label>
                <div class="col-sm-8">
                    <p class="form-control-static" style="word-break: break-all;">{{msgLogData.id}}</p>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">消息类型：</label>
                <div class="col-sm-8">
                    <p class="form-control-static">{{msgLogData.type}}</p>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">消息创建时间：</label>
                <div class="col-sm-8">
                    <p class="form-control-static">{{util.formatMillisec(msgLogData.timeStamp, "yyyy-MM-dd hh:mm:ss")}}</p>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">是否同步消息：</label>
                <div class="col-sm-8">
                    <p class="form-control-static">{{msgLogData.sync ? "是" : "否"}}</p>
                </div>
            </div>
            <div class="form-group col-md-3">
                <label class="col-sm-4 control-label">是否单应用消息：</label>
                <div class="col-sm-8">
                    <p class="form-control-static">{{msgLogData.single ? "是" : "否"}}</p>
                </div>
            </div>
            <div class="form-group col-md-12">
                <label class="col-sm-1 control-label">数据：</label>
                <div class="col-sm-11">
                    <p class="form-control-static">{{msgLogData.data}}</p>
                </div>
            </div>
        </form>
    </div>
    <div class="row">
        <form class="form-horizontal" style="width: auto;">
            <div class="row" v-for="item in msgLogData.dealCondition">
	            <div class="form-group col-md-3">
	                <label class="col-sm-4 control-label">处理队列：</label>
	                <div class="col-sm-8">
	                    <p class="form-control-static" style="word-break: break-all;">{{item.queueName}}</p>
	                </div>
	            </div>
	            <div class="form-group col-md-2">
	                <label class="col-sm-8 control-label">处理状态：</label>
	                <div class="col-sm-4">
	                    <p class="form-control-static" :class="{'msg-deal-success': item.dealStatus==3,'msg-deal-fail': item.dealStatus==4}">{{getDealStatusWord(item.dealStatus)}}</p>
	                </div>
	            </div>
	            <div class="form-group col-md-3">
	                <label class="col-sm-4 control-label">处理结束时间：</label>
	                <div class="col-sm-8">
	                    <p class="form-control-static">{{util.formatMillisec(item.updatedTime, "yyyy-MM-dd hh:mm:ss")}} (耗时{{(item.updatedTime-msgLogData.timeStamp)/1000}}s)</p>
	                </div>
	            </div>
	            <div class="form-group col-md-3">
	                <label class="col-sm-4 control-label">失败原因：</label>
	                <div class="col-sm-8">
	                    <p class="form-control-static">{{item.errorMsg}}</p>
	                </div>
	            </div>
	            <button v-if="item.dealStatus==4" type="button" class="btn btn-primary" @click="resend(item.queueName)">重新发起</button>
            </div>
        </form>
    </div>
</div>
<script src="${request.contextPath}/statics/js/msgLogDtl.js?_${.now?long}"></script>
</body>
</html>